// Copyright 2012-present OSBI Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

.sku-query-designer-dialog {
  .bp3-dialog-body {
    height: 70% !important;
  }

  .container-fluid,
  .row,
  .col-xs {
    height: 100% !important;
  }

  .col-xs-6 {
    min-width: 90% !important;
    height: 50% !important;
  }

  .bp3-card {
    width: 227px;
    height: calc(100% - 15px) !important;
    padding: 0;
  }

  .sku-card-header {
    .bp3-popover-target {
      width: 100% !important;
    }

    .sku-fields-list {
      font-weight: bold;
      border-bottom: 1px solid rgba(16, 22, 26, 0.15);
      border-radius: 0;
      border-top-left-radius: 3px;
      border-top-right-radius: 3px;
      box-shadow: none;

      &:hover {
        box-shadow: none;
      }
    }

    .sku-tab-measures,
    .sku-tab-dimensions {
      &.bp3-active {
        border-bottom: 0;
        box-shadow: none;
      }
    }
  }

  .sku-card-body {
    overflow-x: hidden;
    overflow-y: auto;
    height: calc(100% - 30px);

    .sku-connectable {
      display: block;
      float: left;
      overflow-x: hidden;
      overflow-y: auto;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      line-height: 14px;
      list-style: none;

      .placeholder {
        margin: 2px 3px;
        padding: 3px;
        padding-right: 0 !important;
        padding-left: 22px !important;
        color: #999;
        border: 1px dashed #999;
      }
    }
  }

  .sku-card-remove-item {
    display: none;
    height: calc(100% - 30px);

    .bp3-non-ideal-state {
      .bp3-heading {
        font-size: 1rem;
      }
    }
  }

  // Ant Design Styles

  .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
    background-color: transparent !important;
  }

  .ant-tree li .ant-tree-node-content-wrapper:hover {
    background-color: transparent !important;
  }

  // Draggables

  .ui-draggable-dragging,
  .ui-sortable-helper {
    display: inline !important;
    width: 220px !important;
    min-width: 200px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 1px 8px !important;
    line-height: 18px !important;
    list-style-type: none !important;
    cursor: -webkit-grabbing !important;
    cursor: -moz-grabbing !important;
    cursor: grabbing !important;
    text-align: left !important;
  }

  .ui-draggable-dragging a,
  .ui-sortable-helper a {
    padding: 0 !important;
    background-image: none !important;
    white-space: nowrap !important;
  }
}
